/**
 * 
 */
package com.technodo.play;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.Button;

import com.technodo.R;
import com.technodo.TechnodoMain;
import com.technodo.utils.GlobalPreferences;
import com.technodo.utils.StringConstants;

/**
 * @author Shantanu
 *
 */
public class UnderTheHoodActivity extends Activity {


	private static final String TAG = "UnderTheHoodActivity";

	private static GlobalPreferences globalPreferences = GlobalPreferences.getGlobalPreferences();

	//private MenuAdapter mMenuAdapter;
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		Log.d(TAG,"In onCreate");
		// Make Window Fullscreen as it is a game
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
				WindowManager.LayoutParams.FLAG_FULLSCREEN);

		setContentView(R.layout.main_menu);

		//To setup Listners
		setUpItems();

		/*mMenuAdapter = new MenuAdapter(listOptions);
		setListAdapter(mMenuAdapter);*/
	}
	private void setUpItems() {
		Button classicPlayButton = (Button) findViewById(R.id.googleLogin);
		classicPlayButton.setOnClickListener(onClickMenu);

		Button multiPlayerButton = (Button)findViewById(R.id.heighScores);
		multiPlayerButton.setOnClickListener(onClickMenu);

		Button howToPlayButton = (Button)findViewById(R.id.masterReset);
		howToPlayButton.setOnClickListener(onClickMenu);

		Button underTheHoodButton = (Button)findViewById(R.id.sceneEditor);
		underTheHoodButton.setOnClickListener(onClickMenu);

		Button exitButton = (Button)findViewById(R.id.reportDebugLogs);
		exitButton.setOnClickListener(onClickMenu);
	}

	protected void onButtonClick (View v) {
		switch (v.getId()) {

		case R.id.googleLogin:
			break;

		case R.id.heighScores:

			break;

		case R.id.sceneEditor:

			break;

		case R.id.masterReset:
			Intent resertIntent = new Intent(this, TechnodoMain.class);
			resertIntent.putExtra(StringConstants.KEY_LAUNCHER_RESET, true);
			startActivity(resertIntent);
			break;	

		case R.id.reportDebugLogs:

			break;
		default:
			break;
		}
	}
	private View.OnClickListener onClickMenu = new View.OnClickListener() {
		public void onClick(View view) {
			onButtonClick(view);
		}
	};


}
